import processing.core.PGraphics;
/*------------------------------------------------------------------------------------------------------------------*/
public abstract class TrackedObject {
        int myID;
	Vector3f _myPosition;
	Vector3f _myPreviousPosition;
	Vector3f _myNextPosition;
	Vector3f _myDiffPosition;
	//
        float lookAheadFactor = 3;
	long myStartLiveTime;
	boolean assignedToBlob;
/*------------------------------------------------------------------------------------------------------------------*/
	TrackedObject() 
        {
	//_myArea = new Vector3f();
        _myPosition = new Vector3f();
	_myPreviousPosition = new Vector3f();
        _myNextPosition = new Vector3f();
	_myDiffPosition = new Vector3f();
	 myStartLiveTime = System.currentTimeMillis();
	}
/*------------------------------------------------------------------------------------------------------------------*/
        public Vector3f getPosition() {
		return _myPosition;
	}
        public void setPosition(Vector3f v){
		setPosition(v.x,v.y,v.z,v.w);
	}
	public void setPosition(float theX, float theY, float theZ, float theW) {
		_myPreviousPosition.set(_myPosition);
		_myPosition.set(theX, theY, theZ, theW);
		_myDiffPosition.set(_myPosition);
		_myDiffPosition.sub(_myPreviousPosition);
		_myNextPosition.set(_myPosition);
		_myNextPosition.add(_myDiffPosition);
	} 
	public void setStartValues() {
		_myPreviousPosition.set(_myPosition);
		_myNextPosition.set(_myPosition);	
	}
	public Vector3f getPreviousPosition() {
		return _myPreviousPosition;
	}
//	
}
